package test1231;

public class MemberB extends Father {

    int hour;
    int money;

    public MemberB() {
    }

    public MemberB(String name, int hour, int money) {
        this.name = name;
        this.hour = hour;
        this.money = money;
    }

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "MemberB{" +
                "name='" + name + '\'' +
                ", hour=" + hour +
                ", money=" + money +
                '}';
    }

    @Override
    public double m() {
        return hour * money;
    }
}